package cn.wxq.daily.empdailymgforserve.controller;
import cn.wxq.daily.empdailymgforserve.model.Result;
import cn.wxq.daily.empdailymgforserve.model.StatusCode;
import cn.wxq.daily.empdailymgforserve.domain.Test;
import cn.wxq.daily.empdailymgforserve.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*
测试
 */
@CrossOrigin //跨越处理
@RestController
@RequestMapping("/test")
@Api(value = "TestController|测试")
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping(value = "/findAllData", method = RequestMethod.POST)
    @ApiOperation(value = "查询系统用户信息")
    public Result findAllUser() {
        List<Test> alLdata = testService.findALLdata();
        return new Result(true, StatusCode.OK, "查询成功", alLdata);
    }

}
